<div class="tm-sidebar uk-width-medium-1-5 uk-hidden-small uk-row-first">
  <div style="height: 102px;padding-right: 20px;margin-top: 50px">
    <%= link_to "#", class: 'uk-navbar-brand uk-hidden-small' do %>
      <%= image_tag 'rails-logo.svg', class: 'uk-margin uk-margin-remove pull-left', style: 'width: 100%;height: auto;' %>
    <% end %>
  </div>
  <ul class="tm-nav uk-nav uk-nav-parent-icon" data-uk-nav>


    <%# if can_entrance?('backend/admin_users', 'index', current_administrator) %>
    <!--      <li class="<%#= current_nav_class(:user) %>">-->

    <% if can? :index, AdminUser.new %>
      <li>
        <%= link_to backend_admin_users_path do %>
          <!--        <i class="uk-icon-justify uk-icon-user"></i>-->
          <span class="nav-title">管理员管理</span>
        <% end %>
      </li>
    <% end %>

    <% if can? :index, Role.new %>
      <li>
        <%= link_to backend_roles_path do %>
          <!--<i class="uk-icon-justify uk-icon-user"></i>-->
          <span class="nav-title">角色管理</span>
        <% end %>
      </li>
    <% end %>

    <% if can? :index, User.new %>
      <li>
        <%= link_to backend_users_path do %>
          <!--<i class="uk-icon-justify uk-icon-user"></i>-->
          <span class="nav-title">用户管理</span>
        <% end %>
      </li>
    <% end %>

    <% if can? :index, Micopost.new %>
      <li>
        <%= link_to backend_micoposts_path do %>
          <!--<i class="uk-icon-justify uk-icon-user"></i>-->
          <span class="nav-title">内容管理</span>
        <% end %>
      </li>
    <% end %>


  </ul>

  <!--  二级菜单  -->

  <!--  <div class="sidebar-hover" onmouseleave="hideItem('.sidebar-hover')">-->
  <!--    <ul class="tm-nav tm-nav-hover uk-nav uk-nav-parent-icon" data-uk-nav id="fee">-->
  <!--      费用分析-->
  <!--      <li class="uk-nav-header">费用分析</li>-->
  <%# if can_entrance?('admin/expense_types', 'show', current_administrator) %>
  <!--        <li class="<%#= current_nav_class(:admin_expense_types) %>">-->
  <%#= link_to admin_expense_type_path do %>
  <!--            <span class="nav-title">费用分类统计</span>-->
  <%# end %>
  <!--        </li>-->
  <%# end %>
  <%# if can_entrance?('admin/expense_locations', 'index', current_administrator) %>
  <!--        <li class="<%#= current_nav_class(:admin_expense_locations) %>">-->
  <%#= link_to admin_expense_locations_path do %>
  <!--            <span class="nav-title">费用城市统计</span>-->
  <%# end %>
  <!--        </li>-->
  <%# end %>
  <!--    </ul>-->
  <!--  </div>-->


</div>

<script type="text/javascript" charset="utf-8">
    function showItem(item) {
        $('.tm-nav-hover').hide()
        $('.sidebar-hover').show()
//    $(this).parent().addClass('uk-active')
//    $('.sidebar-hover li').removeClass('uk-active')
        $(item).show()
    }

    function hideItem(item) {
        $(item).hide()
    }
</script>
